package com.lxu.redis_.redistemplate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import java.util.Set;

@Component
public class MyRedisTemplate {

    @Autowired
    private StringRedisTemplate redisTemplate;

    public Set<String> keys(String pattern){
        Set<String> set = redisTemplate.keys(pattern);
        return set;
    }


}
